package com.lyd.service.impl;

import java.util.List;

import com.lyd.dao.FolderDao;
import com.lyd.dao.impl.FolderDaoImpl;
import com.lyd.entity.FolderEntity;
import com.lyd.service.FolderService;

public class FolderServiceImpl implements FolderService {
	private FolderDao folderDao = new FolderDaoImpl();

	@Override
	public boolean addFolder(FolderEntity nodeName) {
		folderDao.addFolder(nodeName);
		return false;
	}

	@Override
	public boolean updateFolder(FolderEntity nodeName) {
		folderDao.updateFolder(nodeName);
		return false;
	}

	@Override
	public boolean deleteFolder(String nodeName) {
		folderDao.deleteFolder(nodeName);
		return false;
	}

	@Override
	public List<FolderEntity> listAll() {
	
		return folderDao.listAll();
	}

	@Override
	public List<FolderEntity> listAll(String roleCode) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isExists(String nodeName) {
		if(folderDao.get(nodeName)!=null) {
			return true;
		}
		return false;
	}

}
